/*
	Author: Superxpdude

	Description:
	Remove a unit from the driver's seat of a vehicle

	Parameter(s):

		0: Object - Unit to remove


	Returns:
	NOTHING
*/

// Define variables
private ["_unit","_admin","_vehicle"];
_unit = _this select 0;
_admin = _this select 1;
_vehicle = vehicle _unit;
_unit action ["getOut", _vehicle];
_unit action ["engineOff", _vehicle];
_vehicle setVelocity [0, 0, 0];

if (_admin) then {
	hint "Only Admins can use this vehicle!";
} else {
	hint "Only Pilots are allowed to fly!";
};

sleep 1.1;
if (isEngineOn _vehicle) then {
	_vehicle engineOn false;
};
